@echo off
:open
echo 开始ping ipv6线路
ping test6.ustc.edu.cn
if %ERRORLEVEL%==0 goto Ok
if %ERRORLEVEL%==1 goto No
exit
:No
COLOR 74
cls&echo V6状态异常 %date%_%time%
 ::失败后输出日志
echo V6连接失败 %date%_%time%>>netconnect.txt
echo 禁用指定网络
netsh interface set interface "WINET"  admin= DISABLED
ping 127.0.1 /n 5 >nul
echo 开放指定网络
netsh interface set interface "WINET"  admin= enabled  
ping 127.0.1 /n 20 >nul
goto open
:Ok
COLOR E2
cls&echo V6状态正常 %date%_%time%
ping 127.0.1 /n 300 >nul
goto open
::ver1.1.5 由空耀软件部门制作的很好用的小工具，喜欢请多多点赞~